
<!DOCTYPE html>

<html lang="zh"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>心心向善 - 用户注册</title>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="keywords" content="心心向善">
<meta name="description" content="心心向善">
<style type="text/css">
body { _behavior: url('');
}
input[type="ii"]{
    align-items: flex-start;
    text-align: center;
    cursor: default;
    color: buttontext;
    background-color: buttonface;
    box-sizing: border-box;
    padding: 2px 6px 3px;
    border-width: 2px;
    border-style: outset;
    border-color: buttonface;
    border-image: initial;
}
</style>
<link href="__PUBLIC__/Home/css/base.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Home/css/home_header.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Home/css/member_login.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Home/css/font-awesome.min.css" rel="stylesheet" />
<link href="__PUBLIC__/Home/css/dialog.css" rel="stylesheet" type="text/css">

<script src="__PUBLIC__/Home/js/jquery.js"></script>
<script src="__PUBLIC__/Home/js/jquery.ui.js"></script>
<script src="__PUBLIC__/Home/js/common.js"></script>
<script src="__PUBLIC__/Home/js/jquery.validation.min.js"></script>
<script src="__PUBLIC__/Home/js/taglibs.js"></script>
<script src="__PUBLIC__/Home/js/tabulous.js"></script>
<script type="text/javascript">
var URLSHOP = '/shop/index'; 
//alert(URLSHOP);
</script>
</head>
<body>
<div class="header-wrap">
  <header class="public-head-layout wrapper">
    <h1 class="site-logo">
		<a href="/">
			<volist name="service" id="vo">
				<eq name="vo.name" value="net_logo" >
					<if condition="$vo.value neq ''">
					<img src="{$vo.value}" class="pngFix">
					<else/>
					<img src="__PUBLIC__/Home/images/logo.png" class="pngFix">
					</if>
				</eq>
			</volist>
	    </a>
	</h1>
	<div class="nc-login-now">我已经注册，现在就<a href="/login.html" title="" class="register">登录</a></div>
  </header>
</div>

<!-- PublicHeadLayout End -->

<div id="append_parent"></div>
<div id="ajaxwaitid"></div>


<div class="nc-register-bg">
  <div class="nc-register-box">
    <div class="nc-register-layout">
      <div class="left">
        <div class="nc-register-mode">
          <ul class="tabs-nav">
            <li><a href="#default" class="tabulous_active">账号注册<i></i></a></li>
			<!--  <li><a href="#mobile" class="">手机注册<i></i></a></li> -->
			<span class="tabulousclear"></span>
          </ul>	  
		
          <div id="tabs_container" class="tabs-container transition" style="height: 383px;">
             <div id="default" class="tabs-content make_transist hideleft showleft" style="position: absolute; top: 0px;">
              <form id="register_form" method="post" class="nc-login-form" action="">
                <input type="hidden" name="formhash" value="">
				<dl>
                  <dt>用户名：</dt>
                  <dd>
                    <input type="text" id="user_name" name="user_name" class="text" tipMsg="请使用6-20个中、英文、数字及“-”符号" value="" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <dl>
                  <dt>设置密码：</dt>
                  <dd>
                    <input type="text" id="password" name="password" class="text" tipMsg="6-20个大小写英文字母、符号或数字" value="" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <dl>
                  <dt>确认密码：</dt>
                  <dd>
                    <input type="text" id="password_confirm" name="password_confirm" class="text" tipMsg="请再次输入密码" value="" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <dl class="mt15">
                  <dt>邮箱：</dt>
                  <dd>
                    <input type="text" id="email" name="email" class="text" tipmsg="输入常用邮箱作为验证及找回密码使用" value="" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <div class="code-div mt15">
                  <dl>
                    <dt>验证码：</dt>
                    <dd>
                       <input type="text" name="code" id="code3" autocomplete="off" class="text w100" tipMsg="输入验证码"  size="10" value="" placeholder=""/>
                    </dd>
                  </dl>
                  <span><img src="{:U('login/verify')}"onclick="fleshVerify3()" alt="如果看不到验证码,点击刷新验证码" id="verifyImg3"> </span>
			   </div>
               <dl class="clause-div">
                  <dd>
                    <input name="agree" type="checkbox" class="checkbox" id="clause" value="1" checked="checked">
                    阅读并同意<a href="" target="_blank" class="agreement" title="阅读并同意">《服务协议》</a></dd>
                </dl>
                <div class="submit-div">
                  <input type="submit" id="Submit" value="立即注册" class="submit">
                </div>
                <input type="hidden" value="reg_pc" name="ref_url">
                <input type="hidden" name="form_submit" value="ok">
              </form>
            </div>
            <div id="mobile" class="tabs-content hideleft make_transist" style="position: absolute; top: 0px;">
              <form id="post_form" method="post" class="nc-login-form">
                <input type="hidden" name="formhash" value="">
				<input type="hidden" name="form_submit" value="ok">
                <dl class="">
                  <dt>手机号：</dt>
                  <dd>
                    <input type="text" class="text" tipMsg="请输入手机号码" autocomplete="off" value="" name="phone" id="phone" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <div class="code-div">
                  <dl>
                    <dt>验证码：</dt>
                    <dd>
                       <input type="text" name="code" id="code4" autocomplete="off" class="text w100" tipMsg="输入验证码"  size="10" value="" placeholder=""/>
                    </dd>
                  </dl>
                  <span><img src="{:U('login/verify')}"onclick="fleshVerify4()" alt="如果看不到验证码,点击刷新验证码" id="verifyImg4"> </span>
			   </div>
				    
                <div class="tiptext" id="sms_text">确保上方验证码输入正确，点击<span><a href="javascript:void(0);" onclick="get_sms_captcha(&#39;1&#39;)"><i class="icon-mobile-phone"></i>发送短信验证</a></span>，并将您手机短信所接收到的“6位验证码”输入到下方短信验证，再提交下一步。</div>
                <dl>
                  <dt>短信验证：</dt>
                  <dd>
                    <input type="text" name="sms_captcha" autocomplete="off" tipMsg="输入6位短信验证码" class="text" id="sms_captcha" size="15" value="" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <div class="submit-div">
                  <input type="button" id="submitBtn" class="submit" value="下一步">
                </div>
              </form>
              <form style="display: none;" id="register_sms_form" class="nc-login-form" method="post" action="">
                <input type="hidden" name="form_submit" value="ok">
                <input type="hidden" name="register_captcha" id="register_sms_captcha" value="">
                <input type="hidden" name="register_phone" id="register_phone" value="">
                <dl>
                  <dt>用户名：</dt>
                  <dd>
                    <input type="text" id="member_name" name="member_name" class="text w150" value="">
                  </dd>
                  <span class="note">系统生成随机用户名，可选择默认或自行修改一次。</span>
                </dl>
                <dl>
                  <dt>设置密码：</dt>
                  <dd>
                    <input type="text" id="sms_password" name="password" class="text w150" value="">
                  </dd>
                  <span class="note">系统生成随机密码，请牢记或修改为自设密码。</span>
                </dl>
                <dl class="mt15">
                  <dt>邮箱：</dt>
                  <dd>
                    <input type="text" id="sms_email" name="email" class="text" value="输入常用邮箱作为验证及找回密码使用" tipMsg="输入常用邮箱作为验证及找回密码使用" style="color: rgb(187, 187, 187);" placeholder="">
                  </dd>
                </dl>
                <dl class="clause-div">
                  <dd>
                    <input name="agree" type="checkbox" class="checkbox" id="sms_clause" value="1" checked="checked">
                    阅读并同意<a href="" target="_blank" class="agreement" title="阅读并同意">《服务协议》</a></dd>
                </dl>
                <div class="submit-div">
                  <input type="submit" value="提交注册" class="submit" title="提交注册">
                </div>
              </form>
            </div>
         </div>
        </div>
      </div>
      <div class="right">
        <div class="reister-after">
          <h4>注册之后您可以</h4>
          <ol>
            <li class="ico01"><i></i>购买商品支付订单</li>
            <li class="ico02"><i></i>收藏商品关注店铺</li>
            <li class="ico03"><i></i>安全交易诚信无忧</li>
            <li class="ico04"><i></i>积分获取优惠购物</li>
            <li class="ico05"><i></i>会员等级享受特权</li>
            <li class="ico06"><i></i>评价晒单站外分享</li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</div>

<script>

	$("#logoin").click(function(){		
		var uname = $("#user_name").val();
		var password = $("#password").val();
		var code = $("#code").val();
		var sms_captcha = 1;
		
		if (!code) {
			$("#code").parents('dl:first').addClass('error');
		} else {
					
			$("#code").parents('dl:first').removeClass('error');
			tip_nick(uname,password,code,sms_captcha);
		}		
	});
        //验证用户名和证件是否一致
        function tip_nick(uname,password,code,sms_captcha) {

            $.ajax({
                url:'/userlogin',
                data:{uname:uname,upwd:password,code:code,pm_sms:sms_captcha},
                type:'post',
                dataType:'json',
                success:function (e) {
					
					var html="";

                    if (e.error) {
							$(function(){
								timer(1);
							}); 
							html +='<div class="dialog_body" id="fwin_dialog" style="position: fixed; z-index: 1701; left: 400px; top: 288.5px;" initialized="true"><style type="text/css">object{visibility:hidden;}</style><h3 class="dialog_head"><span class="dialog_title"><span class="dialog_title_icon">提示信息</span></span><span class="dialog_close_button" id="fwin_dialog_close" onclick="hideMenu("fwin_dialog", "dialog")" title="关闭">X</span></h3><div class="eject_con"><div class="dialog_message_contents"><i class="alert_error"></i>'+e.error+'</div></div><div class="dialog_buttons_bar"><time class="countdown"><font id="second_show"> </font>秒后窗口关闭</time></div></div><div id="fwin_dialog_cover" style="position: absolute; z-index: 1700; top: 0px; left: 0px; width: 100%; height: 753px; background-color: transparent; opacity: 0;"></div>';
							$('#append_parent').html(html);
							setTimeout(function(){$('#append_parent').html('');},2000);				
													
					} else if(e.info) {
						location.href = URLSHOP;//location.href实现客户端页面的跳转 
					}
					
                }
            });
        }

</script>
<script type="text/javascript">
var intDiff = parseInt(60);//倒计时总秒数量
function timer(intDiff){
    window.setInterval(function(){
    var second=0;//时间默认值        
    if(intDiff > 0){
        second = intDiff;
    }
	
    $('#second_show').html(second);
    intDiff--;
    }, 1000);
} 

</script>
<script src="__PUBLIC__/Home/js/tabulous.js"></script>

	<script>
//注册表单验证
	$().ready(function() {

		// validate signup form on keyup and submit
		$("#register_form").validate({

		rules : {
			
            user_name : {
                required : true,
                rangelength : [6,20],
                letters_name : true,
            },
            password : {
                required : true,
                minlength: 6,
				maxlength: 20
            },
            password_confirm : {
                required : true,
                equalTo  : '#password'
            },
            email : {
                required : true,
                email    : true,
            },
		
			code : {
                required : true,
            },
			agree : {
                required : true
            }
        },
        messages : {
            user_name : {
                required : '<i class="icon-exclamation-sign"></i>用户名不能为空',
                rangelength : '<i class="icon-exclamation-sign"></i>用户名必须在6-20个字符之间',
				letters_name: '<i class="icon-exclamation-sign"></i>可包含“_”、“-”，不能是纯数字',
            },
            password  : {
                required : '<i class="icon-exclamation-sign"></i>密码不能为空',
                minlength: '<i class="icon-exclamation-sign"></i>密码长度应在6-20个字符之间',
				maxlength: '<i class="icon-exclamation-sign"></i>密码长度应在6-20个字符之间'
            },
            password_confirm : {
                required : '<i class="icon-exclamation-sign"></i>请再次输入密码',
                equalTo  : '<i class="icon-exclamation-sign"></i>两次输入的密码不一致'
            },
            email : {
                required : '<i class="icon-exclamation-sign"></i>电子邮箱不能为空',
                email    : '<i class="icon-exclamation-sign"></i>这不是一个有效的电子邮箱',
            },
			code : {
                required : '<i class="icon-remove-circle" title="请输入验证码"></i>',
            },
			agree : {
                required : '<i class="icon-exclamation-sign"></i>请勾选服务协议'
            }
        }
		});
		

	});
	</script>
	
	<script type="text/javascript">
	$(function(){

		$('input').change(function(){
			$("input[name='formhash']").val(_getRandomString(35));

		});
		$('select').change(function(){
			$("input[name='formhash']").val(_getRandomString(35));
		});
	});
	

	// 获取长度为len的随机字符串  
	function _getRandomString(len) {  
		len = len || 32;  
		var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1  
		var maxPos = $chars.length;  
		var pwd = '';  
		for (i = 0; i < len; i++) {  
			pwd += $chars.charAt(Math.floor(Math.random() * maxPos));  
		}  
		return pwd;  
	} 
  </script>
	
<script>
$(function(){
	//初始化Input的灰色提示信息  
	$('input[tipMsg]').inputTipText({pwd:'password,password_confirm'});
	//注册方式切换
	$('.nc-register-mode').tabulous({
		 //动画缩放渐变效果effect: 'scale'
		 effect: 'slideLeft'//动画左侧滑入效果
		//动画下方滑入效果 effect: 'scaleUp'
		//动画反转效果 effect: 'flip'
	});
	var div_form = '#default';
	$(".nc-register-mode .tabs-nav li a").click(function(){
        if($(this).attr("href") !== div_form){
            div_form = $(this).attr('href');
            $(""+div_form).find(".makecode").trigger("click");
    	}
	});
	
});
</script>
<script type="text/javascript" src="__PUBLIC__/Home/js/connect_sms.js" charset="utf-8"></script> 
<script>
$(function(){
	$("#submitBtn").click(function(){
        if($("#post_form").valid()){
            check_captcha();
    	}
	});
	$("#post_form").validate({
        errorPlacement: function(error, element){
            var error_td = element.parent('dd');
            error_td.append(error);
            element.parents('dl:first').addClass('error');
        },
        success: function(label) {
            label.parents('dl:first').removeClass('error').find('label').remove();
        },
        onkeyup: false,
		rules: {
			phone: {
                required : true,
                mobile : true
            },
			captcha : {
                required : true,
                minlength: 4,
                remote   : {
                    url : 'index.php?act=seccode&op=check&nchash=62d19c43',
                    type: 'get',
                    data:{
                        captcha : function(){
                            return $('#image_captcha').val();
                        }
                    },
                    complete: function(data) {
                        if(data.responseText == 'false') {
                        	document.getElementById('sms_codeimage').src='index.php?act=seccode&op=makecode&type=50,120&nchash=62d19c43&t=' + Math.random();
                        }
                    }
                }
            },
			sms_captcha: {
                required : function(element) {
                    return $("#image_captcha").val().length == 4;
                },
                minlength: 6
            }
		},
		messages: {
			phone: {
                required : '<i class="icon-exclamation-sign"></i>输入正确的手机号',
                mobile : '<i class="icon-exclamation-sign"></i>输入正确的手机号'
            },
			captcha : {
                required : '<i class="icon-remove-circle" title="请输入验证码"></i>',
                minlength: '<i class="icon-remove-circle" title="请输入验证码"></i>',
				remote	 : '<i class="icon-remove-circle" title="验证码不正确"></i>'
            },
			sms_captcha: {
                required : '<i class="icon-exclamation-sign"></i>请输入六位短信验证码',
                minlength: '<i class="icon-exclamation-sign"></i>请输入六位短信验证码'
            }
		}
	});
    $('#register_sms_form').validate({
        errorPlacement: function(error, element){
            var error_td = element.parent('dd');
            error_td.append(error);
            element.parents('dl:first').addClass('error');
        },
        success: function(label) {
            label.parents('dl:first').removeClass('error').find('label').remove();
        },
    	submitHandler:function(form){
    	    ajaxpost('register_sms_form', '', '', 'onerror');
    	},
        rules : {
            member_name : {
                required : true,
                rangelength : [6,20],
                letters_name : true,
                remote   : {
                    url :'index.php?act=login&op=check_member&column=ok',
                    type:'get',
                    data:{
                        user_name : function(){
                            return $('#member_name').val();
                        }
                    }
                }
            },
            password : {
                required   : true,
                minlength: 6,
				maxlength: 20
            },
            email : {
                email    : true,
                remote   : {
                    url : 'index.php?act=login&op=check_email',
                    type: 'get',
                    data:{
                        email : function(){
                            return $('#sms_email').val();
                        }
                    }
                }
            },
            agree : {
                required : true
            }
        },
        messages : {
            member_name : {
                required : '<i class="icon-exclamation-sign"></i>用户名不能为空',
                rangelength : '<i class="icon-exclamation-sign"></i>用户名必须在6-20个字符之间',
				letters_name: '<i class="icon-exclamation-sign"></i>可包含“_”、“-”，不能是纯数字',
				remote	 : '<i class="icon-exclamation-sign"></i>该用户名已经存在'
            },
            password  : {
                required : '<i class="icon-exclamation-sign"></i>密码不能为空',
                minlength: '<i class="icon-exclamation-sign"></i>密码长度应在6-20个字符之间',
				maxlength: '<i class="icon-exclamation-sign"></i>密码长度应在6-20个字符之间'
            },
            email : {
                email    : '<i class="icon-exclamation-sign"></i>这不是一个有效的电子邮箱',
				remote	 : '<i class="icon-exclamation-sign"></i>该电子邮箱已经存在'
            },
            agree : {
                required : '<i class="icon-exclamation-sign"></i>请勾选服务协议'
            }
        }
    });
});
</script>
<div id="footer" class="wrapper">
  <p><a href="/">首页</a>
                                                                      </p>
  Copyright 2016 <a href="/" target="_blank"><br></a></div><a href="/" target="_blank">




</a>

<script>
//重载验证码
function fleshVerify3()
{
var timenow = new Date().getTime();
document.getElementById('verifyImg3').src= '{:U("login/verify")}?'+timenow;
}
</script>
<script>
//重载验证码
function fleshVerify4()
{
var timenow = new Date().getTime();
document.getElementById('verifyImg4').src= '{:U("login/verify")}?'+timenow;
}
</script>
</body></html>

	

